import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;

class ImageBackgroundPanel extends JPanel {
    BufferedImage image;

    ImageBackgroundPanel(BufferedImage image) {
        this.image = image;
    }

    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.drawImage(image, 0, 0, this);
    }
}